<template>
  <div class="container">
    <div class="main">
      <div class="footer_item" v-for="item in footerData" :key="item.id">
        <div class="title">{{ item.title }}</div>
        <div class="content" v-html="item.value"></div>
        <!-- <div
            class="item"
            :class="{ a: child.url }"
            v-for="child in item.children"
            :key="child.name"
          >
            <span>{{ child.name }}</span
            ><span v-if="child.content">：{{ child.content }}</span>
          </div> -->
      </div>
      <div class="footer_item">
        <div class="qr_code">
          <img :src="weChatQrCode" alt="" />
        </div>
        <div class="qr_code_text">微信公众号</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    footerData: {
      type: Array,
      default: function () {
        return [];
      },
    },
    weChatQrCode: {
      type: String,
      default: "",
    },
  },
  data() {
    return {
      data: [
        {
          id: 1,
          title: "友情链接",
          children: [
            {
              url: "123",
              name: "西北农业科技大学",
            },
          ],
        },
        {
          id: 2,
          title: "查档咨询",
          children: [
            {
              name: "办公电话",
              content: "029-88888888",
            },
            {
              name: "综合档案",
              content: "029-88888888",
            },
            {
              name: "学生档案",
              content: "029-8888888",
            },
          ],
        },
        {
          id: 3,
          title: "联系我们",
          children: [
            {
              name: "版权所有",
              content: "西北农林科技大学档案馆",
            },
            {
              name: "电话",
              content: "029-88888888",
            },
            {
              name: "地址",
              content: "陕西省杨凌区西北农林科技大学南校区",
            },
            {
              name: "邮编",
              content: "650000",
            },
          ],
        },
      ],
    };
  },
};
</script>

<style lang="scss" scoped>
.container {
  background-color: #c34f3d;
  padding-bottom: 60px;
  .main {
    width: 1440px;
    min-height: 200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    .footer_item {
      flex: 2;
      &:last-child {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
      }
      .title {
        font-size: 20px;
        color: #fff;
        font-weight: bold;
        height: 40px;
        line-height: 40px;
      }
      .content {
        font-size: 14px;
        color: #fff;
        height: 25px;
        line-height: 25px;
        ::v-deep a {
          text-decoration: none;
          color: #fff;
          &:hover {
            text-decoration: underline;
          }
        }
      }
      .qr_code {
        width: 120px;
        height: 120px;
        img {
          width: 100%;
        }
      }
      .qr_code_text {
        color: #fff;
      }
    }
  }
}
</style>
